<template>
  <div class="left-container">
    <h3>Left 组件---{{ msg }}---{{ count }}</h3>
    <button @click="add">+1</button> 
  </div>
</template>

<script>
import eventBus from '../utils/eventBus'
import bus from '@/utils/eventBus'
export default {
  props:{
  msg:String
},
data(){
  return {
    count:1
  }
},

methods:{

  add(){
    this.count++
    this.$emit('getCount',this.count)
    bus.$emit('share',this.count)
  }

}
}

</script>

<style lang="less">
.left-container {
  padding: 0 20px 20px;
  background-color: orange;
  min-height: 250px;
  flex: 1;
}
</style>
